package com.sdy.healthcode.biz.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.sdy.healthcode.biz.model.ExpertsInformation;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

public class DoctorManagerDTO {
    @Data
    @Accessors(chain = true)
    public static class Doctor {
        /**
         * 医生id
         */
        @TableId
        private Integer id;

        /**
         * 医生姓名
         */
        private String name;

        /**
         * 所在诊室
         */
        private String department;

        /**
         * 所在诊室
         */
        private Integer departmentId;

        /**
         * 状态 1、可预约 2、长期停诊 3、停诊不显示 4、临时停诊
         */
        private Integer suspendService;

        /**
         * 简介
         */
        private String introduction;

        /**
         * 手机号
         */
        private String phoneNumber;

        /**
         * 职称 0.初级 1.中级 2.副高级 3.正高级
         */
        private Integer professionalTitle;

        /**
         * 专家诊金
         */
        private BigDecimal visitPrice;
        
        public static Doctor from(ExpertsInformation expertsInformation) {
            return new Doctor().setId(expertsInformation.getId())
                    .setIntroduction(expertsInformation.getIntroduction())
                    .setName(expertsInformation.getName())
                    .setPhoneNumber(expertsInformation.getPhoneNumber())
                    .setProfessionalTitle(expertsInformation.getProfessionalTitle())
                    .setSuspendService(expertsInformation.getSuspendService())
                    .setVisitPrice(expertsInformation.getVisitPrice());
        }
    }
}
